package com.jelly.node.obj;
///*
// * Playdom, Inc. (c) 2009 - 2010 All Rights Reserved
// */
//package com.xin.node.obj;
//
//import com.dol.cdf.common.crypto.Guid;
//
//
//public class ObjectServerCachedObject extends CachedObject
//{
//    // in super:
//    //public Guid guid;
//    //public int version;// is -1 for read only
//    //public Entity entity = null; 
//    //public byte[] lastSerialization;
//
// //   public long file = 0;// which file we're written to
////	public int offset = 0;// where in the file to find us
//	
//	// should we sometimes cache the value, and not just the pjson ? YES !! 
//	
//    public ObjectServerCachedObject(Guid guid, int version , Entity e)
//    {
//        super(guid, version, e);
//    }
//     
//    private ObjectServerCachedObject( )
//    {
//        super(null, 0, null);
//    }
//    
//    public int length(){
//        if ( this.lastSerialization != null )
//            return this.lastSerialization.length;
//        return 4096;// what to say here?? 
//    }
//    @SuppressWarnings("unused")
//	 // GENERATED MOJASI CODE
//    /**
//     * This is the serialization interface for objects.
//     * </p>
//     * It is generated by <code>GenerateMojasi</code> so don't bother editing it. <code>GenerateMojasi</code>
//     * will generate code to support adding and deleting instance variables by keeping state in a m.json file of the
//     * same name as the alias of this class.
//     */
//    static public class ObjectServerCachedObjectMFactory extends CachedObjectMFactory {
//        //declare field alias'
//
//        @SuppressWarnings("unchecked")
//        public ObjectServerCachedObjectMFactory() {
//            super(new MojasiToken("OSCO"), ObjectServerCachedObject.class);
//        }
//
//        @SuppressWarnings("unchecked")
//        public ObjectServerCachedObjectMFactory(MojasiToken name, Class clazz) {
//            super(name, clazz);
//        }
//
//        @Override
//        public Object read(MojasiParser parser, MojasiToken token, Object obj) throws MojasiException {
//            super.read(parser,token,obj);
//            ObjectServerCachedObject me = (ObjectServerCachedObject) obj;
//            MojasiToken kv;
//            // me.(m)ojasiReadExtras(parser) could be here;
//            return obj;
//        };
//
//        @Override
//        public void write(MojasiWriter w, Object obj1) throws MojasiException {
//            ObjectServerCachedObject me = (ObjectServerCachedObject) obj1;
//            // me.(m)ojasiWriteExtras(w) could be here;
//            super.write(w, obj1);
//        };
//
//        @Override
//        public Object make(MojasiParser parser, MojasiToken token)  {
//            Object tmp = null;//(p)reMojasiMake(parser,token); could be here
//            if (tmp == null)
//                tmp = new ObjectServerCachedObject();
//            return tmp;
//        };
//
//        @Override
//        public void init() {
//            super.init();
//        };
//    };
//// GENERATED MOJASI CODE<br>
//}
